Optimal. Leaf size=158 \[ \frac {i n (d \tan (e+f x))^{n+2} \, _2F_1\left (1,\frac {n+2}{2};\frac {n+4}{2};-\tan ^2(e+f x)\right )}{2 a d^2 f (n+2)}+\frac {(1-n) (d \tan (e+f x))^{n+1} \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};-\tan ^2(e+f x)\right )}{2 a d f (n+1)}+\frac {(d \tan (e+f x))^{n+1}}{2 d f (a+i a \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3552, 3538, 3476, 364} \[ \frac {i n (d \tan (e+f x))^{n+2} \, _2F_1\left (1,\frac {n+2}{2};\frac {n+4}{2};-\tan ^2(e+f x)\right )}{2 a d^2 f (n+2)}+\frac {(1-n) (d \tan (e+f x))^{n+1} \, _2F_1\left (1,\frac {n+1}{2};\frac {n+3}{2};-\tan ^2(e+f x)\right )}{2 a d f (n+1)}+\frac {(d \tan (e+f x))^{n+1}}{2 d f (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 364
Rule 3476
Rule 3538
Rule 3552
Rubi steps
\begin {align*} \int \frac {(d \tan (e+f x))^n}{a+i a \tan (e+f x)} \, dx &=\frac {(d \tan (e+f x))^{1+n}}{2 d f (a+i a \tan (e+f x))}-\frac {\int (d \tan (e+f x))^n (-a d (1-n)-i a d n \tan (e+f x)) \, dx}{2 a^2 d}\\ &=\frac {(d \tan (e+f x))^{1+n}}{2 d f (a+i a \tan (e+f x))}+\frac {(1-n) \int (d \tan (e+f x))^n \, dx}{2 a}+\frac {(i n) \int (d \tan (e+f x))^{1+n} \, dx}{2 a d}\\ &=\frac {(d \tan (e+f x))^{1+n}}{2 d f (a+i a \tan (e+f x))}+\frac {(d (1-n)) \operatorname {Subst}\left (\int \frac {x^n}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{2 a f}+\frac {(i n) \operatorname {Subst}\left (\int \frac {x^{1+n}}{d^2+x^2} \, dx,x,d \tan (e+f x)\right )}{2 a f}\\ &=\frac {(1-n) \, _2F_1\left (1,\frac {1+n}{2};\frac {3+n}{2};-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{1+n}}{2 a d f (1+n)}+\frac {i n \, _2F_1\left (1,\frac {2+n}{2};\frac {4+n}{2};-\tan ^2(e+f x)\right ) (d \tan (e+f x))^{2+n}}{2 a d^2 f (2+n)}+\frac {(d \tan (e+f x))^{1+n}}{2 d f (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 18.76, size = 0, normalized size = 0.00 \[ \int \frac {(d \tan (e+f x))^n}{a+i a \tan (e+f x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{n} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan \left (f x + e\right )\right )^{n}}{i \, a \tan \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.89, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \tan \left (f x +e \right )\right )^{n}}{a +i a \tan \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {i \int \frac {\left (d \tan {\left (e + f x \right )}\right )^{n}}{\tan {\left (e + f x \right )} - i}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________